<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	
	<title>{$pageTitle}</title>
	
	<!-- head --><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	{include file="head.tpl"}
	
</head>

<body>

<!-- body_js -->
{include file="body_js.tpl"}

	<div id="wrap">
		
		<!-- header -->
		{include file="header.tpl"}
		
		<div id="body">
			
			<div id="body_left">
			
				<!-- breadcrumbs -->
				{include file="breadcrumbs.tpl"}
				
				{if $unknownPoem eq "yes"}
					<h1>{l s='Poesía no encontrada'}</h1>
					<p>{l s='Lo sentimos pero este poema no existe!'}</p>
				{else}
					<h1> {$title} </h1>
					<!-- confirmation -->
					{if $confirmation ne ""}
					<div class="notice" id="notice">
						{$confirmation}
					</div>
					{/if}
					<!-- response_to -->
					{if $responseTo ne ""}
					<p class="responseTo">{l s='Respuesta a la poesía'} <a href="{$responseTo.link}">{$responseTo.title}</a></p>
					{/if}
					
					{if $deleted eq "yes"}
						<div id="notice" class="notice">
							<p>{l s='La poesía ha sido eliminada!'}</p>
						</div>
						<p>
							<input type="button" value="{l s='Aceptar'}" onclick="javascript:window.location='{$smarty.const.BASE_URL}poems.php?category={$category}'" />
						</p>
					{else}
						<p style="text-align:right; font-size:10px;">{l s='Publicada por:'} <a href="{$smarty.const.BASE_URL}member.php?name={$author}">{$author}</a> {l s='en'} <a href="{$smarty.const.BASE_URL}poems.php?category={$category}">{$categoryName}</a></p>
						
						<p>
							{if $author eq $session_username or $session_admin == 1}
								<a href="{$smarty.const.BASE_URL}edit-poem.php?id={$id}" class="edit"><span>{l s='Editar poesía'}</span></a>
								<a href="javascript:void(0);" onclick="javascript:confirmurl('{$smarty.const.BASE_URL}poem.php?id={$id}&amp;delete=1','{l s='Está seguro que decea eliminar esta poesía?'}');" class="delete"><span>{l s='Eliminar poesía'}</span></a>
							{/if}
								<a href="{$smarty.const.BASE_URL}new-poem.php?response_to={$id}" class="pencil"><span>{l s='Responde con otra poesía'}</span></a>
							{if $author ne $session_username}
								{if $voted == false}
									<a href="{$poem_url}&amp;vote=yes" class="thumb_up"><span>{l s='Votar!'}</span></a>
								{/if}
							{/if}
							
							<!-- AddThis Button BEGIN -->
&nbsp;<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4ad2ff7561ffbbd1"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pub=xa-4ad2ff7561ffbbd1"></script>
<!-- AddThis Button END -->

								
						</p>
						
						<p>{$poem}</p>

                                                {if $id == 245}
  <!-- monkey! -->
  <div style="padding-bottom:15px;">
    <div>
      <embed src="http://petswf.bunnyherolabs.com/adopt/swf/monkey" width="177" height="212" quality="high" bgcolor="FBF7F7" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="cn=tzica&an=crazypoems&clr=0xfb87f4" type="application/x-shockwave-flash">
      </embed>
    </div>
  </div>


<img style="visibility:hidden;width:0px;height:0px;" border=0 width=0 height=0 src="http://counters.gigya.com/wildfire/IMP/CXNID=2000002.0NXC/bT*xJmx*PTEyMzIxNDQ5OTc3ODEmcHQ9MTIzMjE*NTAyNTM3NSZwPTU1NzEmZD*mZz*yJnQ9Jm89MmU1ZTQ2ZGY*NWE*NGZhOWFhOTM4ZWE4NTQ1NmU4OTg=.gif" />
{/if}
						
						<p style="font-size:10px;">{l s='Fecha de publicación'} {$publishDate} {if $publishDate eq $lastUpdate}{else}| {l s='Última modificación:'} {$lastUpdate}{/if} | {l s='Vistas:'} {$readed}
						{if $votes > 0} | 
							<strong>{if $votes == 1}
							1 vot
							{else}
							{$votes} voturi
							{/if}</strong>
						{/if}
						</p>
						
						<!-- no ad here -->
						
						<!-- same author start -->
						{if $sameAuthorPoems ne ""}
						<h1>{l s='Poesías del mismo autor'}</h1>
  					<ul class="asterix">
  						{section name=poem loop=$sameAuthorPoems}
  							<li><a href="{$sameAuthorPoems[poem].link}">{$sameAuthorPoems[poem].title}</a></li>
  						{/section}
  					</ul>
  					<div class="hrTop">&nbsp;</div>
					  {/if}
						<!-- same author end -->
						
						<!-- responses -->
						{if $responsePoems ne ""}
						<h1>{l s='Respuestas a esta poesía'}</h1>
						<ul class="asterix">
						{section name=poem loop=$responsePoems}
							<li><a href="{$responsePoems[poem].link}">{$responsePoems[poem].title}</a> by <a href="{$smarty.const.BASE_URL}member.php?name={$responsePoems[poem].author}">{$responsePoems[poem].author}</a></li>
						{/section}
						</ul>
						<div class="hrTop">&nbsp;</div>
						{/if}
						
						<!-- comments -->
						{section name=comment loop=$comments}
						<p><a name="comment{$comments[comment].id}"></a>
                                                {if $comments[comment].photo ne ""}
                                                <img src="/{$comments[comment].photo}" width="50" alt="" style="margin-left:10px; float: right;" />
                                                {/if}
							{if $comments[comment].author eq ""}
							<strong>{$comments[comment].fullname}</strong>
							{else}
							<strong><a href="{$smarty.const.BASE_URL}member.php?name={$comments[comment].author}">{$comments[comment].author}</a></strong>
							{/if}
							a comentat:<br /><br />
							{$comments[comment].comment}
							
						</p>
                                                <div class="clearer"></div>
						{/section}
						
						<h1>{l s='Agrega un comentario'}<a name="add_comment"></a></h1>
						
						{if $error_msg ne ""}
							<div class="error" id="notice">
								{$error_msg}
							</div>
						{/if}
				
						{if $form_sent eq "yes" and $error_msg eq ""}
							<div class="notice" id="notice">
								<p> {l s='Tu comentario ha sido agregado!'} </p>
							</div>
						{else}
							<form action="{$poem_url}#add_comment" method="post">
							
							{if $session_username eq ""}
							<p class="form_item">
								{l s='Si tienes cuenta'} <a href="{$smarty.const.BASE_URL}login.php?next={$smarty.const.BASE_URL}poem.php?id={$id}#add_comment">{l s='Entra aquí'}</a>.
							</p>
							
							<p class="form_item">
							<span class="label">{l s='Nombre'}</span>
							<input name="form_sent" type="hidden" value="yes" />
							<input name="fullname" type="text" value="{$fullname}" class="wide" />
							</p>
							
							<p class="form_item">
							<span class="label">{l s='DIRECCIÓN DE E-MAIL'}</span>
							<span class="desc">{l s='No será publicada en la página.'}</span>
							<input name="email" type="text" value="{$email}" class="wide" />
							</p>
							{/if}
							
							<p class="form_item">
							<span class="label">{l s='COMENTARIO'}</span>
							{if $session_username ne ""}
								<input name="form_sent" type="hidden" value="yes" />
								<input name="fullname" type="hidden" value="{$session_fullname}" />
								<input name="email" type="hidden" value="{$session_email}" />
							{/if}
							<textarea name="comment" id="comment" rows="5" cols="55">{$comment}</textarea>
							</p>

                                                        {if $session_username eq ""}
                                                        <p class="form_item">
                                                        <span class="label">{l s='Código de verificación'}</span>
                                                        <img id="captcha" src="/inc/securimage/securimage_show.php" alt="CAPTCHA Image" style="border: 1px solid #ccc;" />
                                                        <a href="#" onclick="document.getElementById('captcha').src = '/inc/securimage/securimage_show.php?' + Math.random(); return false">{l s='Recargar imagen'}</a>
                                                        <br />
                                                        <input name="captcha_code" type="text" value="" />
                                                        </p>
                                                        {/if}
		
							<p class="form_item">
							<input type="submit" value="{l s='Agrega comentario'}" />
							</p>
							
							</form>
						{/if}
						
					    {/if}
					
				{/if}
				
			</div>
			<div id="body_right">
			  <!-- body_right -->
				{include file="body_right.tpl"}
			</div>
			<div class="clearer"></div>
		</div>
	</div>
	<!-- footer -->
	{include file="footer.tpl"}
</body>
</html>
